<%
	c.jsFiles.append('/script/login/signup.js?v=12')
%>
<style type="text/css">
#require_code{
	cursor:pointer;
	position:absolute;
	right:0;
	width:90px;
	height:25px;
	margin-right:120px;
	background:url('/image/global/button_send_authcode.png');
}
#require_code:hover{background-position:0 -25px;}
#form_signup #submit{
	cursor:pointer;
	position:absolute;
	right:30px;
	width:130px;
	height:25px;
	background:url('/image/global/button_ensure_signup.png');
}
#form_signup #submit:hover{background-position:0 -25px;}
</style>
<div id="signup_page_bound">
	<div class="page_variable">
		<div var_name="errMsg">${c.errMsg}</div>
		<div var_name="last_signup_gender">
			% if 'gender' in request.POST : 
				${request.POST['gender']}
			% endif
		</div>
		<div var_name="last_signup_birthday_year">
			% if 'birthday_year' in request.POST : 
				${request.POST['birthday_year']}
			% endif
		</div>
		<div var_name="last_signup_birthday_month">
			% if 'birthday_month' in request.POST : 
				${request.POST['birthday_month']}
			% endif
		</div>
		<div var_name="last_signup_birthday_day">
			% if 'birthday_day' in request.POST : 
				${request.POST['birthday_day']}
			% endif
		</div>
		<div var_name="last_signup_school">
			% if 'school' in request.POST : 
				${request.POST['school']}
			% endif
		</div>
		<div var_name="last_signup_profession">
			% if 'profession' in request.POST : 
				${request.POST['profession']}
			% endif
		</div>
		<div var_name="last_signup_grade">
			% if 'grade' in request.POST : 
				${request.POST['grade']}
			% endif
		</div>
	</div>
	% if 'method' in request.GET and request.GET['method'] == 'email' :
		<h1>邮箱注册<span style="font-weight:normal;font-size:12px;">（<a href="/login/signup">手机注册？</a>）</span></h1>
	% else :
		<h1>手机注册<span style="font-weight:normal;font-size:12px;">（<a href="/login/signup?method=email">邮箱注册？</a>）</span></h1>
	% endif
	<div class="page_column_left_padding15">
		<div class="top"></div>
		<div class="content">
		% if 'method' in request.GET and request.GET['method'] == 'email' :
			<form id="form_signup" method="post" action="/login/signup?method=email" onsubmit="return checkForm();">
		% else :
			<form id="form_signup" method="post" action="/login/signup" onsubmit="return checkForm();">
		% endif
				<h2>实名信息</h2>
				% if 'method' in request.GET and request.GET['method'] == 'email' : 
					<div id="signup_email">
						<label>邮箱</label>
						% if 'email' in request.POST :
							<input type="input" id="signup_input_email" name="email" class="validate[required,custom[email]]" value="${request.POST['email']}"></input>
						% else :
							<input type="input" id="signup_input_email" name="email" class="validate[required,custom[email]]" value=""></input>
						% endif
						<a href="javascript:void(0);" id="require_code"></a>
					</div>
				% else :
					<div id="signup_mobile">
						<label>手机号</label>
						% if 'mobile' in request.POST :
							<input id="signup_input_mobile" name="mobile" class="validate[required,funcCall[validateMobile]]" value="${request.POST['mobile']}"></input>
						% else :
							<input id="signup_input_mobile" name="mobile" class="validate[required,funcCall[validateMobile]]" value=""></input>
						% endif
						<a href="javascript:void(0);" id="require_code"></a>
					</div>
				% endif
				<div id="signup_register_code">
					<label>验证码</label>
					% if 'registerCode' in request.POST :
						<input id="input_register_code" name="registerCode" class="validate[required,fixedLength[8]]" value="${request.POST['registerCode']}"></input>
					% else :
						<input id="input_register_code" name="registerCode" class="validate[required,fixedLength[8]]" value=""></input>
					% endif
				</div>
				<div id="signup_password">
					<label>密码</label>
					<input type="password" name="password" id="input_password" class="validate[required,funcCall[validateNewPass]]"></input>
				</div>
				<div id="signup_confirm_pass">
					<label>确认密码</label>
					<input type="password" id="input_confirm_pass" class="validate[required,funcCall[validateRetypePass]]"></input>
				</div>
				<h2>基本信息</h2>
				<div id="signup_name">
					<label>姓名</label>
					% if 'name' in request.POST :
						<input id="input_name" name="name" class="validate[required,uLength[4,16],funcCall[validateName]]" value="${request.POST['name']}"></input>
					% else :
						<input id="input_name" name="name" class="validate[required,uLength[4,16],funcCall[validateName]]" value=""></input>
					% endif
				</div>
				<div id="signup_gender">
					<label>性别</label>
					<input type="radio" name="gender" id="input_gender" class="validate[required]" value="male">男</input>
					<input type="radio" name="gender" id="input_gender" class="validate[required]" value="female">女</input>
				</div>
				<div id="signup_birthday">
					<label>生日</label>
					<select name="birthday_year" id="input_birthday_year" style="width:70px;">
						<option value='--'>请选择</option>
					</select>
					<select name="birthday_month" id="input_birthday_month" style="width:42px;">
						<option value='--'>--</option>
					</select>
					<select name="birthday_day" id="input_birthday_day" style="width:42px;">
						<option value='--'>--</option>
					</select>
				</div>
				<div id="signup_school">
					<label>学校</label>
					<select name="school" id="input_school" style="width:160px;"></select>
				</div>
				<div id="signup_profession">
					<label>专业</label>
					<select name="profession" id="input_profession" style="width:160px;">
					</select>
				</div>
				<div id="user_grade">
					<label>年级</label>
					<select name="grade" id="input_grade" style="width:160px;">
						<option value='--'>请选择</option>
					</select>
				</div>
				<h2>附加信息</h2>
				% if 'method' in request.GET and request.GET['method'] == 'email' :
					<div id="signup_mobile">
						<label>手机号</label>
						% if 'mobile' in request.POST :
							<input id="signup_input_mobile" name="mobile" class="validate[optional,funcCall[validateMobile]]" value="${request.POST['mobile']}"></input>
						% else :
							<input id="signup_input_mobile" name="mobile" class="validate[optional,funcCall[validateMobile]]" value=""></input>
						% endif
					</div>
				% else :
					<div id="signup_email">
						<label>常用邮箱</label>
						% if 'email' in request.POST :
							<input type="input" id="signup_input_email" name="email" class="validate[optional,custom[email]]" value="${request.POST['email']}"></input>
						% else :
							<input type="input" id="signup_input_email" name="email" class="validate[optional,custom[email]]" value=""></input>
						% endif
					</div>
				% endif
				<div style="height:25px;"><a id="submit"></a></div>
			</form>
		</div>
		<div class="bottom"></div>
	</div>
	<div class="page_column_right_padding_left30">
		% if 'method' in request.GET and request.GET['method'] == 'email' :
			<h2>为什么注册Fido需要手机号？</h2>
			<p>Fido社区推荐您用手机号注册。这样，您可以收到最新的校园咨讯。</p>
		% else :
			<h2>为什么注册Fido需要手机号？</h2>
			<p>Fido社区采用<strong>实名制</strong>，所有用户将以手机号为ID登录。</p>
			<p>我们将把注册的验证信息发到您的139邮箱，139邮箱的登录网址是<a href="http://mail.139.com/" target="_blank">mail.139.com</a>。</p>
			<p>我们会将每天的最新资讯发至您的139邮箱。如果您希望在第一时间看到这些新鲜资讯，可以开通139邮箱的<strong>短信提醒</strong>服务。</p>
			<p>如果您希望进一步了解139邮箱的短信提醒服务，可以查看<a href="http://mail.10086.cn/ad/sms/sms-notice.htm" target="_blank">mail.10086.cn/ad/sms/sms-notice.htm</a>。</p>
			<p>139邮箱可以通过短信方式开通，您只需编辑短信“KTYX”至10086即可。</p>
			<p>当然，您也可以退订，或使用其他邮箱来接收我们的资讯。您只需要在您的个人页面中设置相关选项就可以了。</p>
		% endif
	</div>
</div>
